Determines if the specified point is within the specified polygon.
Namespace: MindFusion
Assembly: MindFusion.Charting
C# Copy Code |
---|
public static bool PointInPolygon ( |
Visual Basic Copy Code |
---|
Public Shared Function PointInPolygon( _ |
true if the point is inside the polygon, false if not.
It uses the classical polygon hit-testing algorithm: a horizontal ray starting at the point is extended infinitely rightwards and the number of polygon edges that intersect the ray are counted. If the number is odd, the point is inside the polygon.